package jp.ddo.trismegistos.timer.service;

import jp.ddo.trismegistos.timer.R;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

public class ToastService extends Service {

	@Override
	public IBinder onBind(Intent arg0) {
		return null;
	}

	@Override
	public int onStartCommand(final Intent intent, final int flags,
			final int startId) {
		Log.e("hoge", "service start.");
		Log.e("hoge", intent.getStringExtra(getString(R.string.timeMessageKey)));
		Toast.makeText(this,
				intent.getStringExtra(getString(R.string.timeMessageKey)),
				Toast.LENGTH_LONG).show();
		stopSelf();

		return Service.START_NOT_STICKY;
	}

}
